import { createRouter, createWebHistory } from 'vue-router';

// 静态导入组件
import Index from '../views/index.vue';
import Layout from '../views/layout.vue';
import userManagement from '../views/userManagement/userManagement.vue';
import Counselor from '../views/userManagement/counselor.vue';
import Feedback from '../views/feedback.vue';
import Booking from '../views/booking/booking.vue';
import DataAnalysis from '../views/dataAnalysis/dataAnalysis.vue';
import Room from '../views/room.vue';

const router = createRouter({
  history: createWebHistory(),
  routes: [
    {
      path: '/',
      component: Index // 使用静态导入的组件
    },
    {
      path: '/layout',
      component: Layout, // 使用静态导入的组件
      redirect: '/layout/dataAnalysis',
      children: [
        {
          path: 'userManagement',
          component: userManagement // 使用静态导入的组件
        },
        {
          path: 'counselor',
          component:Counselor  // 使用静态导入的组件
        },
        {
          path: 'feedback',
          component: Feedback // 使用静态导入的组件
        },
        {
          path: 'booking',
          component: Booking // 使用静态导入的组件
        },
        {
          path: 'dataAnalysis',
          component: DataAnalysis // 使用静态导入的组件
        },
        {
          path: 'room',
          component: Room // 使用静态导入的组件
        },
      ]
    }
  ]
});


export default router;
